package com.hk.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;

import com.hk.model.CustUserDto;
import com.hk.model.ICustUserService;

public class CustUserDetailController extends AbstractController {
    private ICustUserService custUserService;
	
	public void setCustUserService(ICustUserService custUserService) {
		this.custUserService = custUserService;
	}

	@Override
	protected ModelAndView handleRequestInternal(
			HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		ModelAndView mav=new ModelAndView();
		String id=request.getParameter("id");
		CustUserDto cust=custUserService.getCustUser(id);
		mav.addObject("cust", cust);
		mav.setViewName("custuserdetail");
		return mav;
	}//

}
